.TH "NETCONF rpc-reply" 3 "Fri Aug 3 2012" "Version 0.1.1" "libnetconf" \" -*- nroff -*-
.ad l
.nh
.SH NAME
NETCONF rpc-reply \- 
.PP
libnetconf's functions for handling NETCONF <rpc-reply> messages\&.  

.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef struct nc_msg \fBnc_reply\fP"
.br
.RI "\fIreply message\&. \fP"
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBNC_REPLY_TYPE\fP { \fBNC_REPLY_UNKNOWN\fP, \fBNC_REPLY_HELLO\fP, \fBNC_REPLY_OK\fP, \fBNC_REPLY_ERROR\fP, \fBNC_REPLY_DATA\fP }"
.br
.RI "\fIEnumeration of <rpc-reply> types\&. \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "void \fBnc_callback_error_reply\fP (void(*func)(const char *tag, const char *type, const char *severity, const char *apptag, const char *path, const char *message, const char *attribute, const char *element, const char *ns, const char *sid))"
.br
.RI "\fISet callback function to process (e\&.g\&. print) NETCONF <rpc-error> message items\&. \fP"
.ti -1c
.RI "\fBnc_msgid\fP \fBnc_session_send_reply\fP (struct nc_session *session, const \fBnc_rpc\fP *rpc, const \fBnc_reply\fP *reply)"
.br
.RI "\fISend <rpc-reply> response via specified NETCONF session\&. This function is supposed to be performed only by NETCONF servers\&. \fP"
.ti -1c
.RI "\fBnc_msgid\fP \fBnc_session_recv_reply\fP (struct nc_session *session, \fBnc_reply\fP **reply)"
.br
.RI "\fIReceive <rpc-reply> response from the specified NETCONF session\&. This function is supposed to be performed only by NETCONF clients\&. \fP"
.ti -1c
.RI "char * \fBnc_reply_dump\fP (const \fBnc_reply\fP *reply)"
.br
.RI "\fIDump the rpc-reply message into a string\&. \fP"
.ti -1c
.RI "\fBnc_reply\fP * \fBnc_reply_build\fP (const char *reply_dump)"
.br
.RI "\fIBuild <rpc-reply> message from the string\&. This is the reverse function of the \fBnc_reply_dump()\fP\&. \fP"
.ti -1c
.RI "\fBnc_msgid\fP \fBnc_reply_get_msgid\fP (const \fBnc_reply\fP *reply)"
.br
.RI "\fIGet message-id of the given rpc-reply\&. \fP"
.ti -1c
.RI "\fBNC_REPLY_TYPE\fP \fBnc_reply_get_type\fP (const \fBnc_reply\fP *reply)"
.br
.RI "\fIGet type of the rpc-reply message\&. \fP"
.ti -1c
.RI "char * \fBnc_reply_get_data\fP (const \fBnc_reply\fP *reply)"
.br
.RI "\fIGet content of the <data> element in <rpc-reply>\&. \fP"
.ti -1c
.RI "void \fBnc_reply_free\fP (\fBnc_reply\fP *reply)"
.br
.RI "\fIFree reply message\&. \fP"
.ti -1c
.RI "\fBnc_reply\fP * \fBnc_reply_ok\fP ()"
.br
.RI "\fICreate <ok> rpc-reply response\&. \fP"
.ti -1c
.RI "\fBnc_reply\fP * \fBnc_reply_data\fP (const char *data)"
.br
.RI "\fICreate rpc-reply response with <data> content\&. \fP"
.ti -1c
.RI "\fBnc_reply\fP * \fBnc_reply_error\fP (struct nc_err *error)"
.br
.RI "\fICreate rpc-reply response with <rpc-error> content\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
libnetconf's functions for handling NETCONF <rpc-reply> messages\&. 


.SH "Typedef Documentation"
.PP 
.SS "typedef struct nc_msg \fBnc_reply\fP"

.PP
reply message\&. 
.PP
Definition at line 55 of file netconf\&.h\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBNC_REPLY_TYPE\fP"

.PP
Enumeration of <rpc-reply> types\&. 
.PP
\fBEnumerator: \fP
.in +1c
.TP
\fB\fINC_REPLY_UNKNOWN \fP\fP
value describing that no rpc-reply type was detected so far 
.TP
\fB\fINC_REPLY_HELLO \fP\fP
<hello> message type, same as NC_RPC_HELLO 
.TP
\fB\fINC_REPLY_OK \fP\fP
<ok> rpc-reply message type 
.TP
\fB\fINC_REPLY_ERROR \fP\fP
<rpc-error> rpc-reply message type 
.TP
\fB\fINC_REPLY_DATA \fP\fP
rpc-reply message containing <data> 
.PP
Definition at line 97 of file netconf\&.h\&.
.SH "Function Documentation"
.PP 
.SS "void \fBnc_callback_error_reply\fP (void(*)(const char *tag, const char *type, const char *severity, const char *apptag, const char *path, const char *message, const char *attribute, const char *element, const char *ns, const char *sid)func)"

.PP
Set callback function to process (e\&.g\&. print) NETCONF <rpc-error> message items\&. \fBParameters:\fP
.RS 4
\fIfunc\fP Callback function to use\&. Passed parameters are:
.IP "\(bu" 2
tag - error tag,
.IP "\(bu" 2
type - error layer where the error occurred,
.IP "\(bu" 2
severity - error severity,
.IP "\(bu" 2
apptag - the data-model-specific or implementation-specific error condition, if one exists,
.IP "\(bu" 2
path - XPATH expression identifying element with error,
.IP "\(bu" 2
message - human description of the error,
.IP "\(bu" 2
attribute - name of the data-model-specific XML attribute that caused the error,
.IP "\(bu" 2
element - name of the data-model-specific XML element that caused the error,
.IP "\(bu" 2
ns - name of the unexpected XML namespace that caused the error,
.IP "\(bu" 2
sid - session ID of session holding requested lock\&. 
.PP
.RE
.PP

.SS "\fBnc_msgid\fP \fBnc_session_send_reply\fP (struct nc_session *session, const \fBnc_rpc\fP *rpc, const \fBnc_reply\fP *reply)"

.PP
Send <rpc-reply> response via specified NETCONF session\&. This function is supposed to be performed only by NETCONF servers\&. \fBParameters:\fP
.RS 4
\fIsession\fP NETCONF session to use\&. 
.br
\fIrpc\fP <rpc> message which is request for the sending reply 
.br
\fIreply\fP <repc-reply> message to send\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on error,
.br
 message-id of sent message on success\&. 
.RE
.PP

.SS "\fBnc_msgid\fP \fBnc_session_recv_reply\fP (struct nc_session *session, \fBnc_reply\fP **reply)"

.PP
Receive <rpc-reply> response from the specified NETCONF session\&. This function is supposed to be performed only by NETCONF clients\&. \fBParameters:\fP
.RS 4
\fIsession\fP NETCONF session to use\&. 
.br
\fIreply\fP Received <rpc-reply> 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on error,
.br
 message-id of received message on success\&. 
.RE
.PP

.SS "char* \fBnc_reply_dump\fP (const \fBnc_reply\fP *reply)"

.PP
Dump the rpc-reply message into a string\&. \fBParameters:\fP
.RS 4
\fIreply\fP rpc-reply message\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
String in XML format containing the NETCONF's <rpc-reply> element and all its content\&. Caller is responsible for free of returned string with free()\&. 
.RE
.PP

.SS "\fBnc_reply\fP* \fBnc_reply_build\fP (const char *reply_dump)"

.PP
Build <rpc-reply> message from the string\&. This is the reverse function of the \fBnc_reply_dump()\fP\&. \fBParameters:\fP
.RS 4
\fIreply_dump\fP String containing the NETCONF <rpc-reply> message\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
Complete reply structure used by libnetconf's functions\&. 
.RE
.PP

.SS "\fBnc_msgid\fP \fBnc_reply_get_msgid\fP (const \fBnc_reply\fP *reply)"

.PP
Get message-id of the given rpc-reply\&. \fBParameters:\fP
.RS 4
\fIreply\fP rpc-reply message\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
message-id of the given rpc-reply message\&. 
.RE
.PP

.SS "\fBNC_REPLY_TYPE\fP \fBnc_reply_get_type\fP (const \fBnc_reply\fP *reply)"

.PP
Get type of the rpc-reply message\&. <rpc-reply> message can contain <ok>, <rpc-error> or <data>
.PP
\fBParameters:\fP
.RS 4
\fIreply\fP rpc-reply message 
.RE
.PP
\fBReturns:\fP
.RS 4
One of the NC_REPLY_TYPE\&. 
.RE
.PP

.SS "char* \fBnc_reply_get_data\fP (const \fBnc_reply\fP *reply)"

.PP
Get content of the <data> element in <rpc-reply>\&. \fBParameters:\fP
.RS 4
\fIreply\fP rpc-reply message\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
String with the content of the <data> element\&. Caller is responsible for free of returned string with free()\&. 
.RE
.PP

.SS "void \fBnc_reply_free\fP (\fBnc_reply\fP *reply)"

.PP
Free reply message\&. \fBParameters:\fP
.RS 4
\fIreply\fP reply message to free\&. 
.RE
.PP

.SS "\fBnc_reply\fP* \fBnc_reply_ok\fP ()"

.PP
Create <ok> rpc-reply response\&. \fBReturns:\fP
.RS 4
Created <rpc-reply> message\&. 
.RE
.PP

.SS "\fBnc_reply\fP* \fBnc_reply_data\fP (const char *data)"

.PP
Create rpc-reply response with <data> content\&. \fBReturns:\fP
.RS 4
Created <rpc-reply> message\&. 
.RE
.PP

.SS "\fBnc_reply\fP* \fBnc_reply_error\fP (struct nc_err *error)"

.PP
Create rpc-reply response with <rpc-error> content\&. \fBParameters:\fP
.RS 4
\fIerror\fP NETCONF error description structure for reply message\&. From now, error is connected with the reply and should not be used by the caller\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
Created <rpc-reply> message\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for libnetconf from the source code\&.
